\(\int \frac {(d+e x^r)^2 (a+b \log (c x^n))}{x^6} \, dx\) [390]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F(-2)]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 127 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^6} \, dx=-\frac {b d^2 n}{25 x^5}-\frac {2 b d e n x^{-5+r}}{(5-r)^2}-\frac {b e^2 n x^{-5+2 r}}{(5-2 r)^2}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{5 x^5}-\frac {2 d e x^{-5+r} \left (a+b \log \left (c x^n\right )\right )}{5-r}-\frac {e^2 x^{-5+2 r} \left (a+b \log \left (c x^n\right )\right )}{5-2 r} \]

[Out]

-1/25*b*d^2*n/x^5-2*b*d*e*n*x^(-5+r)/(5-r)^2-b*e^2*n*x^(-5+2*r)/(5-2*r)^2-1/5*d^2*(a+b*ln(c*x^n))/x^5-2*d*e*x^
(-5+r)*(a+b*ln(c*x^n))/(5-r)-e^2*x^(-5+2*r)*(a+b*ln(c*x^n))/(5-2*r)

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {276, 2372, 12, 14} \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^6} \, dx=-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{5 x^5}-\frac {2 d e x^{r-5} \left (a+b \log \left (c x^n\right )\right )}{5-r}-\frac {e^2 x^{2 r-5} \left (a+b \log \left (c x^n\right )\right )}{5-2 r}-\frac {b d^2 n}{25 x^5}-\frac {2 b d e n x^{r-5}}{(5-r)^2}-\frac {b e^2 n x^{2 r-5}}{(5-2 r)^2} \]

[In]

Int[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x^6,x]

[Out]

-1/25*(b*d^2*n)/x^5 - (2*b*d*e*n*x^(-5 + r))/(5 - r)^2 - (b*e^2*n*x^(-5 + 2*r))/(5 - 2*r)^2 - (d^2*(a + b*Log[
c*x^n]))/(5*x^5) - (2*d*e*x^(-5 + r)*(a + b*Log[c*x^n]))/(5 - r) - (e^2*x^(-5 + 2*r)*(a + b*Log[c*x^n]))/(5 -
2*r)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{5 x^5}-\frac {2 d e x^{-5+r} \left (a+b \log \left (c x^n\right )\right )}{5-r}-\frac {e^2 x^{-5+2 r} \left (a+b \log \left (c x^n\right )\right )}{5-2 r}-(b n) \int \frac {-d^2+\frac {10 d e x^r}{-5+r}+\frac {5 e^2 x^{2 r}}{-5+2 r}}{5 x^6} \, dx \\ & = -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{5 x^5}-\frac {2 d e x^{-5+r} \left (a+b \log \left (c x^n\right )\right )}{5-r}-\frac {e^2 x^{-5+2 r} \left (a+b \log \left (c x^n\right )\right )}{5-2 r}-\frac {1}{5} (b n) \int \frac {-d^2+\frac {10 d e x^r}{-5+r}+\frac {5 e^2 x^{2 r}}{-5+2 r}}{x^6} \, dx \\ & = -\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{5 x^5}-\frac {2 d e x^{-5+r} \left (a+b \log \left (c x^n\right )\right )}{5-r}-\frac {e^2 x^{-5+2 r} \left (a+b \log \left (c x^n\right )\right )}{5-2 r}-\frac {1}{5} (b n) \int \left (-\frac {d^2}{x^6}+\frac {10 d e x^{-6+r}}{-5+r}+\frac {5 e^2 x^{2 (-3+r)}}{-5+2 r}\right ) \, dx \\ & = -\frac {b d^2 n}{25 x^5}-\frac {2 b d e n x^{-5+r}}{(5-r)^2}-\frac {b e^2 n x^{-5+2 r}}{(5-2 r)^2}-\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{5 x^5}-\frac {2 d e x^{-5+r} \left (a+b \log \left (c x^n\right )\right )}{5-r}-\frac {e^2 x^{-5+2 r} \left (a+b \log \left (c x^n\right )\right )}{5-2 r} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.00 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^6} \, dx=\frac {b n \left (-d^2-\frac {50 d e x^r}{(-5+r)^2}-\frac {25 e^2 x^{2 r}}{(5-2 r)^2}\right )+a \left (-5 d^2+\frac {50 d e x^r}{-5+r}+\frac {25 e^2 x^{2 r}}{-5+2 r}\right )+5 b \left (-d^2+\frac {10 d e x^r}{-5+r}+\frac {5 e^2 x^{2 r}}{-5+2 r}\right ) \log \left (c x^n\right )}{25 x^5} \]

[In]

Integrate[((d + e*x^r)^2*(a + b*Log[c*x^n]))/x^6,x]

[Out]

(b*n*(-d^2 - (50*d*e*x^r)/(-5 + r)^2 - (25*e^2*x^(2*r))/(5 - 2*r)^2) + a*(-5*d^2 + (50*d*e*x^r)/(-5 + r) + (25
*e^2*x^(2*r))/(-5 + 2*r)) + 5*b*(-d^2 + (10*d*e*x^r)/(-5 + r) + (5*e^2*x^(2*r))/(-5 + 2*r))*Log[c*x^n])/(25*x^
5)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(477\) vs. \(2(123)=246\).

Time = 1.10 (sec) , antiderivative size = 478, normalized size of antiderivative = 3.76

method result size
parallelrisch \(-\frac {3125 b \ln \left (c \,x^{n}\right ) d^{2}+1250 b d e n \,x^{r}+325 b \,d^{2} n \,r^{2}+6250 d e \,x^{r} a -750 b \,d^{2} n r +6250 d e \,x^{r} b \ln \left (c \,x^{n}\right )+20 a \,d^{2} r^{4}-300 a \,d^{2} r^{3}-200 a d e \,r^{3} x^{r}+625 b \,d^{2} n +3125 a \,d^{2}+20 \ln \left (c \,x^{n}\right ) b \,d^{2} r^{4}-300 \ln \left (c \,x^{n}\right ) b \,d^{2} r^{3}+1625 \ln \left (c \,x^{n}\right ) b \,d^{2} r^{2}-3750 \ln \left (c \,x^{n}\right ) b \,d^{2} r +4 b \,d^{2} n \,r^{4}-60 b \,d^{2} n \,r^{3}-1000 b d e n r \,x^{r}+1625 a \,d^{2} r^{2}-3750 a \,d^{2} r +625 a \,e^{2} r^{2} x^{2 r}-2500 a \,e^{2} r \,x^{2 r}+625 b \,e^{2} n \,x^{2 r}-50 a \,e^{2} r^{3} x^{2 r}+3125 e^{2} x^{2 r} b \ln \left (c \,x^{n}\right )+200 b d e n \,r^{2} x^{r}+2000 a d e \,r^{2} x^{r}-6250 a d e r \,x^{r}-250 b \,e^{2} n r \,x^{2 r}-50 x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r^{3}+625 x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r^{2}-2500 x^{2 r} \ln \left (c \,x^{n}\right ) b \,e^{2} r +25 b \,e^{2} n \,r^{2} x^{2 r}+3125 e^{2} x^{2 r} a -200 x^{r} \ln \left (c \,x^{n}\right ) b d e \,r^{3}+2000 x^{r} \ln \left (c \,x^{n}\right ) b d e \,r^{2}-6250 x^{r} \ln \left (c \,x^{n}\right ) b d e r}{25 x^{5} \left (-5+2 r \right )^{2} \left (r^{2}-10 r +25\right )}\) \(478\)
risch \(\text {Expression too large to display}\) \(1930\)

[In]

int((d+e*x^r)^2*(a+b*ln(c*x^n))/x^6,x,method=_RETURNVERBOSE)

[Out]

-1/25/x^5*(3125*b*ln(c*x^n)*d^2-250*b*e^2*n*r*(x^r)^2+1250*b*d*e*n*x^r+625*a*e^2*r^2*(x^r)^2-2500*a*e^2*r*(x^r
)^2+625*b*e^2*n*(x^r)^2-50*a*e^2*r^3*(x^r)^2+3125*e^2*(x^r)^2*a+325*b*d^2*n*r^2+6250*d*e*x^r*a+3125*e^2*(x^r)^
2*b*ln(c*x^n)-750*b*d^2*n*r+6250*d*e*x^r*b*ln(c*x^n)+20*a*d^2*r^4-300*a*d^2*r^3-200*a*d*e*r^3*x^r+625*b*d^2*n+
3125*a*d^2+20*ln(c*x^n)*b*d^2*r^4-300*ln(c*x^n)*b*d^2*r^3+1625*ln(c*x^n)*b*d^2*r^2-3750*ln(c*x^n)*b*d^2*r+4*b*
d^2*n*r^4-60*b*d^2*n*r^3-1000*b*d*e*n*r*x^r+1625*a*d^2*r^2-3750*a*d^2*r-50*(x^r)^2*ln(c*x^n)*b*e^2*r^3+625*(x^
r)^2*ln(c*x^n)*b*e^2*r^2-2500*(x^r)^2*ln(c*x^n)*b*e^2*r+200*b*d*e*n*r^2*x^r+2000*a*d*e*r^2*x^r-6250*a*d*e*r*x^
r+25*b*e^2*n*r^2*(x^r)^2-200*x^r*ln(c*x^n)*b*d*e*r^3+2000*x^r*ln(c*x^n)*b*d*e*r^2-6250*x^r*ln(c*x^n)*b*d*e*r)/
(-5+2*r)^2/(r^2-10*r+25)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 466 vs. \(2 (118) = 236\).

Time = 0.33 (sec) , antiderivative size = 466, normalized size of antiderivative = 3.67 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^6} \, dx=-\frac {4 \, {\left (b d^{2} n + 5 \, a d^{2}\right )} r^{4} + 625 \, b d^{2} n - 60 \, {\left (b d^{2} n + 5 \, a d^{2}\right )} r^{3} + 3125 \, a d^{2} + 325 \, {\left (b d^{2} n + 5 \, a d^{2}\right )} r^{2} - 750 \, {\left (b d^{2} n + 5 \, a d^{2}\right )} r - 25 \, {\left (2 \, a e^{2} r^{3} - 25 \, b e^{2} n - 125 \, a e^{2} - {\left (b e^{2} n + 25 \, a e^{2}\right )} r^{2} + 10 \, {\left (b e^{2} n + 10 \, a e^{2}\right )} r + {\left (2 \, b e^{2} r^{3} - 25 \, b e^{2} r^{2} + 100 \, b e^{2} r - 125 \, b e^{2}\right )} \log \left (c\right ) + {\left (2 \, b e^{2} n r^{3} - 25 \, b e^{2} n r^{2} + 100 \, b e^{2} n r - 125 \, b e^{2} n\right )} \log \left (x\right )\right )} x^{2 \, r} - 50 \, {\left (4 \, a d e r^{3} - 25 \, b d e n - 125 \, a d e - 4 \, {\left (b d e n + 10 \, a d e\right )} r^{2} + 5 \, {\left (4 \, b d e n + 25 \, a d e\right )} r + {\left (4 \, b d e r^{3} - 40 \, b d e r^{2} + 125 \, b d e r - 125 \, b d e\right )} \log \left (c\right ) + {\left (4 \, b d e n r^{3} - 40 \, b d e n r^{2} + 125 \, b d e n r - 125 \, b d e n\right )} \log \left (x\right )\right )} x^{r} + 5 \, {\left (4 \, b d^{2} r^{4} - 60 \, b d^{2} r^{3} + 325 \, b d^{2} r^{2} - 750 \, b d^{2} r + 625 \, b d^{2}\right )} \log \left (c\right ) + 5 \, {\left (4 \, b d^{2} n r^{4} - 60 \, b d^{2} n r^{3} + 325 \, b d^{2} n r^{2} - 750 \, b d^{2} n r + 625 \, b d^{2} n\right )} \log \left (x\right )}{25 \, {\left (4 \, r^{4} - 60 \, r^{3} + 325 \, r^{2} - 750 \, r + 625\right )} x^{5}} \]

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^6,x, algorithm="fricas")

[Out]

-1/25*(4*(b*d^2*n + 5*a*d^2)*r^4 + 625*b*d^2*n - 60*(b*d^2*n + 5*a*d^2)*r^3 + 3125*a*d^2 + 325*(b*d^2*n + 5*a*
d^2)*r^2 - 750*(b*d^2*n + 5*a*d^2)*r - 25*(2*a*e^2*r^3 - 25*b*e^2*n - 125*a*e^2 - (b*e^2*n + 25*a*e^2)*r^2 + 1
0*(b*e^2*n + 10*a*e^2)*r + (2*b*e^2*r^3 - 25*b*e^2*r^2 + 100*b*e^2*r - 125*b*e^2)*log(c) + (2*b*e^2*n*r^3 - 25
*b*e^2*n*r^2 + 100*b*e^2*n*r - 125*b*e^2*n)*log(x))*x^(2*r) - 50*(4*a*d*e*r^3 - 25*b*d*e*n - 125*a*d*e - 4*(b*
d*e*n + 10*a*d*e)*r^2 + 5*(4*b*d*e*n + 25*a*d*e)*r + (4*b*d*e*r^3 - 40*b*d*e*r^2 + 125*b*d*e*r - 125*b*d*e)*lo
g(c) + (4*b*d*e*n*r^3 - 40*b*d*e*n*r^2 + 125*b*d*e*n*r - 125*b*d*e*n)*log(x))*x^r + 5*(4*b*d^2*r^4 - 60*b*d^2*
r^3 + 325*b*d^2*r^2 - 750*b*d^2*r + 625*b*d^2)*log(c) + 5*(4*b*d^2*n*r^4 - 60*b*d^2*n*r^3 + 325*b*d^2*n*r^2 -
750*b*d^2*n*r + 625*b*d^2*n)*log(x))/((4*r^4 - 60*r^3 + 325*r^2 - 750*r + 625)*x^5)

Sympy [A] (verification not implemented)

Time = 139.22 (sec) , antiderivative size = 233, normalized size of antiderivative = 1.83 \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^6} \, dx=- \frac {a d^{2}}{5 x^{5}} + 2 a d e \left (\begin {cases} \frac {x^{r}}{r x^{5} - 5 x^{5}} & \text {for}\: r \neq 5 \\\frac {x^{r} \log {\left (x \right )}}{x^{5}} & \text {otherwise} \end {cases}\right ) + a e^{2} \left (\begin {cases} \frac {x^{2 r}}{2 r x^{5} - 5 x^{5}} & \text {for}\: r \neq \frac {5}{2} \\\frac {x^{2 r} \log {\left (x \right )}}{x^{5}} & \text {otherwise} \end {cases}\right ) - \frac {b d^{2} n}{25 x^{5}} - \frac {b d^{2} \log {\left (c x^{n} \right )}}{5 x^{5}} - 2 b d e n \left (\begin {cases} \frac {\begin {cases} \frac {x^{r - 5}}{r - 5} & \text {for}\: r \neq 5 \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{r - 5} & \text {for}\: r > -\infty \wedge r < \infty \wedge r \neq 5 \\\frac {\log {\left (x \right )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + 2 b d e \left (\begin {cases} \frac {x^{r - 5}}{r - 5} & \text {for}\: r \neq 5 \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} - b e^{2} n \left (\begin {cases} \frac {\begin {cases} \frac {x^{2 r - 5}}{2 r - 5} & \text {for}\: r \neq \frac {5}{2} \\\log {\left (x \right )} & \text {otherwise} \end {cases}}{2 r - 5} & \text {for}\: r > -\infty \wedge r < \infty \wedge r \neq \frac {5}{2} \\\frac {\log {\left (x \right )}^{2}}{2} & \text {otherwise} \end {cases}\right ) + b e^{2} \left (\begin {cases} \frac {x^{2 r - 5}}{2 r - 5} & \text {for}\: r \neq \frac {5}{2} \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \log {\left (c x^{n} \right )} \]

[In]

integrate((d+e*x**r)**2*(a+b*ln(c*x**n))/x**6,x)

[Out]

-a*d**2/(5*x**5) + 2*a*d*e*Piecewise((x**r/(r*x**5 - 5*x**5), Ne(r, 5)), (x**r*log(x)/x**5, True)) + a*e**2*Pi
ecewise((x**(2*r)/(2*r*x**5 - 5*x**5), Ne(r, 5/2)), (x**(2*r)*log(x)/x**5, True)) - b*d**2*n/(25*x**5) - b*d**
2*log(c*x**n)/(5*x**5) - 2*b*d*e*n*Piecewise((Piecewise((x**(r - 5)/(r - 5), Ne(r, 5)), (log(x), True))/(r - 5
), (r > -oo) & (r < oo) & Ne(r, 5)), (log(x)**2/2, True)) + 2*b*d*e*Piecewise((x**(r - 5)/(r - 5), Ne(r, 5)),
(log(x), True))*log(c*x**n) - b*e**2*n*Piecewise((Piecewise((x**(2*r - 5)/(2*r - 5), Ne(r, 5/2)), (log(x), Tru
e))/(2*r - 5), (r > -oo) & (r < oo) & Ne(r, 5/2)), (log(x)**2/2, True)) + b*e**2*Piecewise((x**(2*r - 5)/(2*r
- 5), Ne(r, 5/2)), (log(x), True))*log(c*x**n)

Maxima [F(-2)]

Exception generated. \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^6} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^6,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(r-6>0)', see `assume?` for mor
e details)Is

Giac [F]

\[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^6} \, dx=\int { \frac {{\left (e x^{r} + d\right )}^{2} {\left (b \log \left (c x^{n}\right ) + a\right )}}{x^{6}} \,d x } \]

[In]

integrate((d+e*x^r)^2*(a+b*log(c*x^n))/x^6,x, algorithm="giac")

[Out]

integrate((e*x^r + d)^2*(b*log(c*x^n) + a)/x^6, x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (d+e x^r\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x^6} \, dx=\int \frac {{\left (d+e\,x^r\right )}^2\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^6} \,d x \]

[In]

int(((d + e*x^r)^2*(a + b*log(c*x^n)))/x^6,x)

[Out]

int(((d + e*x^r)^2*(a + b*log(c*x^n)))/x^6, x)